<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>
<div class="content-table-breadcrumb"><a href="/bk/level3/id/<?=$this->level2_id?>"><返回</a></div>
<div class="form-edit-task">

<?php if($this->msg):?>
<div class="replace"><?=$this->msg?></div>
<?php endif;?>

<form action="/bk/level3-edit-submit" method="post" name="form1" enctype="multipart/form-data" onsubmit="return submitform(this)">
<span>分类：</span> <select name="category_id" id="category_id">
	<option value="1" <?php if(1==$this->info['category_id']){echo "selected='selected'";}?>>彩票</option>
	<option value="2" <?php if(2==$this->info['category_id']){echo "selected='selected'";}?>>红包</option>
	<option value="3" <?php if(3==$this->info['category_id']){echo "selected='selected'";}?>>奖品</option>
	<option value="4" <?php if(4==$this->info['category_id']){echo "selected='selected'";}?>>打折券</option>
</select>
 <font>*</font><br/>
<span>封面标题：</span><input type="text" placeholder="封面标题" name="banner_text" id="banner_text" value="<?=$this->info['banner_text']?>" />  <font>*</font><br/>
<span>封面图：</span><input type="file" name="image" /> (226x226) <font>*</font><br/>
<?php if($this->info['banner_url']):?>
<a href="/images/banners/<?=$this->info['banner_url']?>" target="_blank"><img src="/images/banners/<?=$this->info['banner_url']?>" border="0" height="30" /></a>&nbsp;&nbsp;<a href="/bk/level3-image-del/level2_id/<?=$this->level2_id?>/id/<?=$this->info['id']?>">删除</a><br /><br />
<?php endif;?>
<span>文章标题：</span><input type="text" placeholder="文章标题" name="slogan" id="slogan" value="<?=$this->info['slogan']?>" />  <font>*</font><br/>
<span>正文：</span><script id="contents" type="text/plain" style="width:750px;height:500px;"></script><br/>
<span>参与人数：</span><input type="text" placeholder="参与人数" name="joined_members" id="joined_members" value="<?=$this->info['joined_members']?>">  <font>*</font><br/>
<span>跳转链接：</span><input type="text" placeholder="跳转链接" name="external_url" id="external_url" value="<?=$this->info['external_url']?>" />  <font>*</font><br/>
<span>状态：</span> <select name="status" id="status">
	<option value="1" <?php if(1==$this->info['status']){echo "selected='selected'";}?>>在线</option>
	<option value="0" <?php if(0==$this->info['status']){echo "selected='selected'";}?>>下线</option>
</select>
 <font>*</font><br/>
<br/>
<?php $n=1;?>
<?php foreach ($this->banners as $bid=>$bval):?>
<span>Banner<?=$n?>：</span><input type="file" name="ebanner_<?=$bid?>" />&nbsp;&nbsp;(720x274)&nbsp;&nbsp;链接<?=$n?>：<input type="text" name="eurl_<?=$bid?>" value="<?=$bval['target_url']?>" /><br/>
<?php if($bval['image_url']):?>
<a href="/images/banners/<?=$bval['image_url']?>" target="_blank"><img src="/images/banners/<?=$bval['image_url']?>" border="0" height="30" /></a>&nbsp;&nbsp;<a href="/bk/level3-banner-del/level2_id/<?=$this->level2_id?>/id/<?=$bid?>">删除</a><br /><br />
<?php endif;?>
<?php $n += 1;?>
<?php endforeach;?>
<?php if(8 > $n):?>
<?php for($k=$n;$k<=8;$k++):?>
<span>Banner<?=$k?>：</span><input type="file" name="nbanner_<?=$k?>" />&nbsp;&nbsp;(720x274)&nbsp;&nbsp;链接<?=$k?>：<input type="text" name="nurl_<?=$k?>" /><br/>
<?php endfor;?>
<?php endif;?>

<input type="hidden" name="id" value="<?=$this->info['id']?>" />
<input type="hidden" name="level2_id" value="<?=$this->level2_id?>" />
<input type="submit" class="buttonlong" value="确认" />
<br /><br />
</form>
</div>
<br/><br/>
</div>

<script>
var ue = UE.getEditor('contents');

ue.ready(function() {
    //设置编辑器的内容
    ue.setContent('<?=$this->info['contents']?>');
});

function submitform() 
{
	form1.submit();
}
</script>